﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="System.Collections.Generic" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	测压仪观测（每月）
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="dolphincontainer">
	    <div id="dolphinnav">
	        <ul class="top_tab">
                <li><a href="/Record/StackWater/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"] %>&factoryId=<%=ViewData["factoryId"] %>"><span>水位及水质</span></a></li>
                <li><a href="/Record/BackWater/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"] %>&factoryId=<%=ViewData["factoryId"] %>"><span>进浆及回水</span></a></li>
                <li><a href="/Record/Settle/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"] %>&factoryId=<%=ViewData["factoryId"] %>"><span>沉降及位移</span></a></li>
                <li><a href="/Record/Ardealite/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"] %>&factoryId=<%=ViewData["factoryId"] %>"><span>磷石膏堆积坝</span></a></li>
                <li><a href="/Record/Ditch/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"]%>&factoryId=<%=ViewData["factoryId"] %>"><span>截洪沟</span></a></li>
                <li><a href="/Record/PiezometerWell/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"]%>&factoryId=<%=ViewData["factoryId"] %>"><span>浸润线观测</span></a></li>
                <li><a href="javascript:return(false);" class="current"><span>渗压观测</span></a></li>
                <li><a href="/Record/Drain/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"]%>&factoryId=<%=ViewData["factoryId"] %>"><span>导渗系统</span></a></li>
	        </ul>
	    </div>
	</div>

    <%
           bool result = (bool)ViewData["success"];
           if(result){ 
        %>
           <div class="tips_area">测压仪数据更新成功</div>
        <%
        }
        %>

    <% using (Html.BeginForm())
    {
        List<Piezometer_base_info> topEquaps = (List<Piezometer_base_info>)ViewData["topEquaps"];
        List<Piezometer_base_info> bottomEquaps = (List<Piezometer_base_info>)ViewData["bottomEquaps"];
        List<Piezometer_monthly_info> topEquapsRecord = (List<Piezometer_monthly_info>)ViewData["topEquapsRecord"];
        List<Piezometer_monthly_info> bottomEquapsRecord = (List<Piezometer_monthly_info>)ViewData["bottomEquapsRecord"];
    %>

        <%= Html.ValidationSummary(true) %>
        <%= Html.Hidden("stack_id", ViewData["id"])%>
        <%= Html.Hidden("factoryId", ViewData["factoryId"]) %>
        <%= Html.Hidden("date", (DateTime)ViewData["date"])%>
       
       <%
           DateTime date = (DateTime)ViewData["date"];
       %>     
    
    <table cellpadding="4" cellspacing="0" class="com_from_table" style="width:756px;">
        <tr>
            <th colspan="2">测压仪（每月 - <%= date.Year%>年<%=date.Month%>月）</th>
        </tr>
        
        <tr>
            <td class="lab" style="width:138px;">测量人员：</td>
            <td style="width:608px;">
                <%= Html.DropDownList("tester_id", ViewData["users"] as List<SelectListItem>, "请选择", new { style = "width:150px" })%>
            </td>
        </tr>

        <tr>
            <td class="lab">查看测压仪位置：</td>
            <td>
                <%if (!string.IsNullOrEmpty((string)ViewData["piezometerEquapPic"])){ %><a href="<%=Url.Content((string)ViewData["piezometerEquapPic"]) %>" target="_blank">测压仪位置图</a><%} %>
            </td>
        </tr>


        <tr>
            <td colspan="2">
                
                <table cellpadding="4" cellspacing="0" border="0" width="100%" class="subtable3">
                    <tr>
                        <th style="width:85px; text-align:center;">测压孔编号</th>
                        <th style="width:85px; text-align:center;">测压仪编号</th>
                        <th style="width:140px; text-align:center;">测量模数（digit)</th>
                        <th style="width:130px; text-align:center;">测量温度  (℃)</th>
                        <th>意见</th>
                    </tr>

                    <%
                        if (topEquaps != null & topEquaps.Count > 0)
                        {
                            for (int i = 0; i < topEquaps.Count; i++)
                            {
                                bool hasTopRecord = topEquapsRecord != null && topEquapsRecord.Count > i;
                                bool hasBottomRecord = bottomEquapsRecord != null && bottomEquapsRecord.Count > i;
                    %>

                    <tr>
                        <td rowspan="2" style="text-align:center; vertical-align:middle;"><%=topEquaps[i].piezometer_hole_id%></td>
                        <td style="text-align:center;"><%=topEquaps[i].piezometer_name%></td>
                        <td style="text-align:center;"><input type="text" size="8" value="<%=hasTopRecord ? (topEquapsRecord[i].gauge_Modulus.HasValue ? topEquapsRecord[i].gauge_Modulus.Value.ToString() : "") : ""%>" name="gauge_Modulus_1_<%=i+1 %>" /></td>
                        <td style="text-align:center;"><input type="text" size="8" value="<%=hasTopRecord ? (topEquapsRecord[i].gauge_temperature.HasValue ? topEquapsRecord[i].gauge_temperature.Value.ToString() : ""): ""%>" name="gauge_temperature_1_<%=i+1 %>" /></td>
                        <td><input type="text" size="30" value="<%=hasTopRecord ? topEquapsRecord[i].Remarks : ""%>" name="Remarks_1_<%=i+1 %>" /></td>
                    </tr>

                    <tr>
                        <td style="text-align:center;"><%=bottomEquaps[i].piezometer_name%></td>
                        <td style="text-align:center;"><input type="text" size="8" value="<%=hasBottomRecord ? (bottomEquapsRecord[i].gauge_Modulus.HasValue ? bottomEquapsRecord[i].gauge_Modulus.Value.ToString() : "") : ""%>" name="gauge_Modulus_2_<%=i+1 %>" /></td>
                        <td style="text-align:center;"><input type="text" size="8" value="<%=hasBottomRecord ? (bottomEquapsRecord[i].gauge_temperature.HasValue ? bottomEquapsRecord[i].gauge_temperature.Value.ToString() : ""): ""%>" name="gauge_temperature_2_<%=i+1 %>" /></td>
                        <td><input type="text" size="30" value="<%=hasBottomRecord ? bottomEquapsRecord[i].Remarks : ""%>" name="Remarks_2_<%=i+1 %>" /></td>
                    </tr>

                    <%
                            }
                        }
                    %>

                </table>

            </td>
        </tr>

    </table>
    
    <div class="submit_btn_area" style="margin-left:152px;">
        <input type="submit" value="提 交" />
    </div>

    <% } %>


</asp:Content>
